const middleLogin = function(req,res,next){ 
    if(req.session && req.session.username && req.session.username === req.body.username){
        console.log(999) 
        next()
    }else{
        console.log(888)
        // res.send('登录失败')
        res.redirect('/reg')
    };
    

}
module.exports = middleLogin